#! /usr/bin/perl

#-------------------------------------------------------------------------------
#--
#-- Module      :  Utils
#-- Copyright   :  (c) Lakshmi Narasimhan T V
#-- License     :  GNU GPLv3
#--
#-- Maintainer  :  <lakshminaras2002 at gmail dot com>
#-- Stability   :  provisional
#-- Portability :  portable
#--
#--
#--
#---------------------------------------------------------------------------------

use strict;
use warnings;

sub stripws($)
{
  my $str = shift;
  $str =~ s/(\s*)//g; # Trim whitespace
  return $str;
}

###############################################################################
# Subroutine to print a message if verbose flag is specified on the command line 
#
sub print_v($)
{
  my $msg = shift;
  #if($verbose)
  #{
     print "$msg\n";
  #}
}

###############################################################################
# Custom sub routines that wrap exit function.
#
sub exit_success()
{
  exit 0;
}

sub exit_failure($)
{
  my $errmsg = shift;

  if(defined $errmsg)
  {
    print "$errmsg\n";
  }
  exit 1; 
}

1;